This invention relates to a switching circuit able to switch a line at least to any one of plural lines (more than three), in an electronic circuit applied to electronic and electric apparatuses or the like.
There are electronic apparatuses (for example, a telephone set) equipped with a microcomputer, having a sliding switch having 3 or more positions.
For example, in an answering telephone set having three functional modes, by selecting the mode thereof, it is possible to select a preferred mode by sliding the sliding switch by hand to the appropriate position.
The position information from this slide switch is input in the microcomputer, and the microcomputer continually exchanges the telephone mode in accordance with that information.
Accordingly, in order to let the microcomputer confirm which position is at present the position of the sliding switch, the microcomputer and the slide switch should be electronically connected. Up to the present, the following conventional circuits have been used.
As shown in FIG. 7, one line 1, connected to one end of a switching element (SW) the contact points of which are exchangeable by shifting the sliding switch, is connected to the output port of a CPU 2 of the microcomputer, and each contact point A and B located on the other end of the switching element SW are connected to the input port Pin 1 and Pin 2 of the CPU 2, and the last contact point C is left unconnected.
As said output port P out 1 discharges the pulsating scanning signal alternatively generating HIGH and LOW signals at specified times, if the signal is input in the input port Pin 1, the switch being already switched to the contact point B, and if the signal is input in the input port Pin 2, the switch is already switched to the contact point A. And if the input port Pin 1 and port Pin 2 have no signals, the switch is already switched to the contact point C.
As described above, when necessitating three contact points, at least, three input or output ports are required on the CPU 2. Similarly, when installing 2 pairs of switching elements, as shown in FIG. 8, two output ports (Pin 1 and Pin 2) transferring said scanning signals, and two input ports (Pin 1 and Pin 2), for a total of four ports, are required on the CPU 2. In this case, the reason for dividing the output port into two ports (Pin 1 and Pin 2) is to identify whether the signal input in said ports (Pin 1 and Pin 2) come from switching element SW1 or SW2, by shifting the pulse timing output from each port.
As described above, in the conventional circuit requiring an exchanging switch having more than three contact points, the required number of ports on a CPU 2 is increased, e.g., three ports for one switching element, 4 ports for a pair of switching elements, etc.
As a result, in accordance with the increase in contact points, the ports provided on the CPU 2 become fully occupied, and the wiring distribution on the circuit board becomes too complex.
Furthermore, as shown in FIG. 8, with the increase of the switching element SW to more than two sets, more than two lines receiving the scanning signals are also required, and the noise generated from the signal lines tend to increase and to exert harmful influences on the electronic circuits except for the switching circuit.
This invention was invented to solve the above-mentioned cumbersome defects.